package com.xiangge.supermarket2.enetity;

import com.xiangge.supermarket.entity.Member;

import java.util.Objects;

public class UserInfo {
    private String id;
    private String name;
    private String type;
    private int integration;
    private String state;

    public UserInfo() {
    }

    public UserInfo(String id, String name, String type, int integration, String state) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.integration = integration;
        this.state = state;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getIntegration() {
        return integration;
    }

    public void setIntegration(int integration) {
        this.integration = integration;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "SupermarketEntity{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", integration=" + integration +
                ", state=" + state +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserInfo userInfo = (UserInfo) o;
        return integration == userInfo.integration &&
                Objects.equals(id, userInfo.id) &&
                Objects.equals(name, userInfo.name) &&
                Objects.equals(type, userInfo.type) &&
                Objects.equals(state, userInfo.state);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, type, integration, state);
    }
}
